import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 牛客网.入门题.简单运算
 */

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        scanner.close();
        int max = a > b ? a : b;
        int min = a + b - max;
        System.out.print(a + b);
        System.out.print(" " + (max - min));
        System.out.print(" " + a * b);
        System.out.print(" " + max / min);
        System.out.print(" " + max % min);
        //write your code here......


    }
}

public class Test {
}
